<?php if (empty($data['list']) || count($data['list']) == 0) { ?>
<div style="text-align:center; padding-top:20px;"><?php __('no result found'); ?></div>
<?php } else { ?>
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="reportTbl reportTbl2">
  <thead>
    <tr>
      <td><?php __('Member Id'); ?></td>
      <td><?php __('Member Code'); ?></td>
      <td><?php __('Full Name'); ?></td>
      <td><?php __('Telephone Number'); ?></td>
      <td><?php __('Sponsor Bonus'); ?></td>
      <td><?php __('Overcommit Bonus'); ?></td>
      <td><?php __('Globe Bonus'); ?></td>
      <td><?php __('Cycle Payout'); ?></td>
      <td><?php __('Cycles'); ?></td>
      <td><?php __('Total'); ?></td>
    </tr>
  </thead>
  <tbody>
<?php     $i = 0;
          foreach ($data['list'] as $code=>$row) {
              $i    += 1;
              $style = ($i%2==0)?'':' style="background-color: #E3E3E3;"'; ?>
    <tr>
      <td<?php e($style); ?>><?php echo isset($row['id']) ? $row['id']:'-'; ?></td>
      <td><?php e($code); ?></td>
      <td><?php echo isset($row['fullname']) ? $row['fullname']:'-'; ?></td>
      <td><?php echo isset($row['mobile']) ? $row['mobile']:'-'; ?></td>
      <td align="right"><?php e(number_format($row['sponsor'],2)); ?></td>
      <td align="right"><?php e(number_format($row['over'],2)); ?></td>
      <td align="right"><?php e(number_format($row['globe'],2)); ?></td>
      <td align="right"><?php e(number_format($row['cyclePay'],2)); ?></td>
      <td align="right"><?php e($row['cycle']); ?></td>
      <td align="right"><?php e(number_format($row['total'],2)); ?></td>
    </tr>
<?php     } ?>
  </tbody>
  <tfoot>
    <tr>
      <td align="right" colspan="4" style="font-weight:bold;"><?php __('Total'); ?>: </td>
      <td align="right" class="total"><?php e(number_format($data['sponsor'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['over'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['globe'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['cyclePay'],2)); ?></td>
      <td align="right" class="total"><?php e($data['cycle']); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total'],2)); ?></td>
    </tr>
  </tfoot>
</table>
<?php } ?>